﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/BackEndFashion.Master"
    Inherits="System.Web.Mvc.ViewPage<IEnumerable<Fashion.Models.ProductCategory>>" %>
<%@ Import Namespace="A" %>
<%@ Import Namespace="Fashion.Common.Const" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
    List
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <h2>
        List</h2>
    <table border="0" cellpadding="0" cellspacing="0">
        <tr>
            <th>
                Id
            </th>
            <th>
                Name
            </th>
            <th>
                Order Display
            </th>
            <th>
                Sub Category
            </th>
            <th>
            </th>
        </tr>
        <%foreach (var productCategory in Model)
          {%>
        <tr>
            <td align="center">
                <%=productCategory.Id %>
            </td>
            <td>
                <%=productCategory.Name %>
            </td>
            <td align="center">
                <%=productCategory.OrderDisplay %>
            </td>
            <td align="center">
                <%=Html.ActionLink("View","Index", "SubCategory", new {parentId=productCategory.Id},null)%>
            </td>
            <td>
                <%=Html.ActionLink(ParameterTemplate.Image, "Update", new { id = productCategory.Id }).DisplayActionLinkByImage(HtmlCode.ImgIconEdit)%>
                <%=Html.ActionLink(ParameterTemplate.Image, "Delete", new { id = productCategory.Id }, new { onclick = "return confirm('Are you sure you wish to delete this record?');" }).DisplayActionLinkByImage(HtmlCode.ImgIconDelete)%>
            </td>
        </tr>
        <%} %>
        <tr>
            <td colspan="5" align="right">
                <%=Html.ActionLink(ParameterTemplate.Image, "Create", "Category").DisplayActionLinkByImage(HtmlCode.ImgIconAddNew)%>
            </td>
        </tr>
    </table>
</asp:Content>
